<template>
  <div class="content_index">
    <div class="ci_header">
      <div class="ci_left">概览</div>
    </div>

    <div class="entrace_box box">
      <div class="home_content">
        <template
          v-for="(item, index) in store.routerStore.menuRoutes"
          :key="index"
        >
          <div
            class="home_content_card"
            v-if="item.meta.title !== '概览'"
            @click="
              router.push({
                path:
                  item.children.length > 0 ? item.children[0].path : item.path,
              })
            "
          >
            <div class="home_content_item">
              <div style="margin-top: 20px">
                <el-icon style="font-size: 40px">
                  <component :is="item.meta.icon"></component>
                </el-icon>
              </div>
              <div style="margin-top: 20px; font-size: 16px">
                {{ item.meta.title }}
              </div>
              <div class="home_Subtitle">
                <div
                  v-for="(data, i) in item.children"
                  :key="i"
                  style="width: calc(100% / 3)"
                >
                  {{ data.meta.title }}
                </div>
              </div>
            </div>
            <div
              v-if="index === 0 || index === 1 || index === 2 "
              class="boder_rigth"
            ></div>
          </div>
        </template>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from "vue-router";
import store from "@/store";
const router = useRouter();
</script>
<style lang="scss" scoped>
@import "../assets/css/list";
@import "../assets/css/position";

.content_index {
  background: #f5f5f5;
  :deep .el-button {
    border-radius: 0;
    height: 32px;
  }
  :deep .el-icon-plus {
    font-weight: bolder;
  }
}
.box {
  background: #fff;
  margin-bottom: 12px;
  .box_title {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 22px;
    font-weight: 600;
  }
}

.total_box {
  display: flex;
  align-items: center;
  padding: 0 24px 24px;
  div {
    width: 30%;
    padding-left: 24px;
    border-right: 1px solid #d9d9d9;
    &.last_item {
      border-right: none;
    }
  }
  .number {
    width: 30%;
    font-size: 24px;
    line-height: 32px;
    font-weight: bold;
  }
  .name {
    font-size: 12px;
    line-height: 20px;
  }
}

.start_row {
  height: calc(100% - 152px);
  .el-col,
  .start_box,
  .doc_box {
    height: 100%;
  }
}

.entrace_box {
  padding: 16px 32px;
  margin-bottom: 12px;
  display: flex;
  .home_content {
    display: flex;
    justify-content: start;
    width: 100%;
    flex-wrap: wrap;
    .home_content_card {
      display: flex;
      justify-content: start;
      width: calc(100% / 3 - 2px);
      .home_content_item {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px;
        width: 100%;
        border-bottom: 1px solid #efefef;
        .home_Subtitle {
          color: rgb(182, 178, 196);
          margin-top: 5px;
          display: flex;
          justify-content: space-between;
          width: 100%;
          flex-wrap: wrap;
          text-align: center;
        }
      }
      .boder_rigth {
        width: 0.5px;
        background-color: #efefef;
        margin: 10px 0 10px 0;
      }
    }
  }
  .home_Subtitle_center {
    margin: 0 auto;
  }

  .entry_img {
    width: 164px;
    height: 100px;
    margin-right: 36px;
  }
  .entry_title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 4px;
  }
  .entry_desc {
    margin-bottom: 12px;
  }
}

.steps {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  padding: 24px 0 16px;
  .step {
    text-align: center;
    max-width: 160px;
    min-width: 120px;

    .step_img {
      width: 68px;
      height: 68px;
    }

    .step_title {
      span {
        display: inline-block;
      }
      span:first-child {
        width: 18px;
        height: 18px;
        background: #2186fc;
        color: #fff;
        border-radius: 18px;
        margin-right: 8px;
      }

      span:last-child {
        margin-top: 4px;
        margin-bottom: 8px;
        font-weight: 600;
        font-size: 14px;
        line-height: 22px;
      }
    }
    .arrow {
      margin: 0 24px;
    }
    .step_introduce {
      font-size: 12px;
      line-height: 20px;
    }
  }
}
</style>
